//386.字典序排数
//https://leetcode.cn/problems/lexicographical-numbers/
class Solution {
public:
    vector<int> lexicalOrder(int n) {
        vector<int> ret;
        for(int i = 1;i<=n;++i) ret.push_back(i);
        sort(ret.begin(),ret.end(),[&](int n1,int n2){
            return to_string(n1) < to_string(n2);
        });

        return ret;
    }
};